import { Routes, RouterModule }  from '@angular/router';

import { Usermanagement } from './usermanagement.component';
import { Generalusers } from './components/generalusers/generalusers.component';
import { Maintenanceusers } from './components/maintenanceusers/maintenanceusers.component';
import { Maintenancerecord } from './components/maintenancerecord/maintenancerecord.component';
import { Channelusers } from './components/channelusers/channelusers.component';
import { Channelmaintenanceusers } from './components/channelmaintenanceusers/channelmaintenanceusers.component';
import { Adminusers } from './components/adminusers/adminusers.component';

// noinspection TypeScriptValidateTypes
const routes: Routes = [
  {
    path: '',
    component: Usermanagement,
    children: [
      { path: 'generalusers', component: Generalusers },
      { path: 'maintenanceusers', component: Maintenanceusers },
      { path: 'maintenanceusers/maintenancerecord/:userId', component: Maintenancerecord },
      { path: 'channelusers', component: Channelusers },
      { path: 'channelmaintenanceusers', component: Channelmaintenanceusers },
      { path: 'channelmaintenanceusers/maintenancerecord/:userId', component: Maintenancerecord },
      { path: 'adminusers', component: Adminusers },
      { path: 'adminusers/maintenancerecord/:userId', component: Maintenancerecord }
      
    ]
  }
];

export const routing = RouterModule.forChild(routes);
